package com.hezhangjian.spring.ext;

import org.springframework.context.annotation.Profile;
import org.springframework.scheduling.annotation.Scheduled;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface ProfileScheduled {
    /**
     * @see Profile#value()
     */
    String[] value();

    /**
     * @see Scheduled#cron()
     */
    String cron() default "";

    /**
     * @see Scheduled#fixedRate()
     */
    long fixedRate() default -1;

    /**
     * @see Scheduled#fixedDelay()
     */
    long fixedDelay() default -1;

    /**
     * @see Scheduled#initialDelay()
     */
    long initialDelay() default -1;
}
